package com.yinkgh.mybatis.common.service.impl;

import java.util.List;

import com.yinkgh.mybatis.common.dao.BaseDao;
import com.yinkgh.mybatis.common.service.BaseService;

public class BaseServiceImpl<T> implements BaseService<T> {

	BaseDao<T> baseDao;
	
	public BaseDao<T> getDao() {
		return baseDao;
	}
	
	@Override
	public int deleteByPrimaryKey(Long id) {
		return getDao().deleteByPrimaryKey(id);
	}

	@Override
	public int insert(T record) {
		return getDao().insert(record);
	}

	@Override
	public int insertSelective(T record) {
		return getDao().insertSelective(record);
	}

	@Override
	public T selectByPrimaryKey(Long id) {
		return getDao().selectByPrimaryKey(id);
	}
	
	@Override
	public List<T> selectListByPrimaryKey(T record) {
		return getDao().selectListByPrimaryKey(record);
	}

	@Override
	public int updateByPrimaryKeySelective(T record) {
		return getDao().updateByPrimaryKeySelective(record);
	}

	@Override
	public int updateByPrimaryKey(T record) {
		return getDao().updateByPrimaryKey(record);
	}

	@Override
	public int insertBatch(List<T> records) {
		return getDao().insertBatch(records);
	}

	
	
}
